package com.platform.util;

import org.apache.log4j.Logger;
import java.util.ResourceBundle;

/**
* 微信小程序配置信息
* @author luojh
* @version $Id: WxConfigUtils.java, v 0.1 2018年6月28日 下午10:49:50 luojh Exp $
*/
public class WxConfigUtils {

    private static Logger log = Logger.getLogger(WxConfigUtils.class);
    private static String appid;
    
    private static String appsecret;
    
    private static String token;
    
    private static String aeskey;
    
    private static String templateId;
    
    private static String msgDataFormat;
    
    private static String domain;
    
    private static String detail;
    
  

    private WxConfigUtils() {

    }

    static {
        // 加载wxcofig配置文件
        ResourceBundle bundle = ResourceBundle.getBundle("wxconfig");
        if (bundle == null) {
            throw new IllegalArgumentException("[wxcofig.properties] is not found!");
        }
        appid = bundle.getString("appid");
        appsecret = bundle.getString("appsecret");
        token = bundle.getString("token");
        aeskey = bundle.getString("aeskey");
        templateId = bundle.getString("templateId");
        msgDataFormat = bundle.getString("msgDataFormat");
        domain = bundle.getString("domain");
        detail = bundle.getString("detail");

    }

    public static String getAppid() {
        return appid;
    }

    public static void setAppid(String appid) {
        WxConfigUtils.appid = appid;
    }

    public static String getAppsecret() {
        return appsecret;
    }

    public static void setAppsecret(String appsecret) {
        WxConfigUtils.appsecret = appsecret;
    }

    public static String getToken() {
        return token;
    }

    public static void setToken(String token) {
        WxConfigUtils.token = token;
    }

    public static String getAeskey() {
        return aeskey;
    }

    public static void setAeskey(String aeskey) {
        WxConfigUtils.aeskey = aeskey;
    }

    public static String getTemplateId() {
        return templateId;
    }

    public static void setTemplateId(String templateId) {
        WxConfigUtils.templateId = templateId;
    }

    public static String getMsgDataFormat() {
        return msgDataFormat;
    }

    public static void setMsgDataFormat(String msgDataFormat) {
        WxConfigUtils.msgDataFormat = msgDataFormat;
    }

    public static String getDomain() {
        return domain;
    }

    public static void setDomain(String domain) {
        WxConfigUtils.domain = domain;
    }

    public static String getDetail() {
        return detail;
    }

    public static void setDetail(String detail) {
        WxConfigUtils.detail = detail;
    }

}